package com.rainmonth.nicehair.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.rainmonth.nicehair.ui.fragment.ZoneAllFragment;
import com.rainmonth.nicehair.ui.fragment.ZoneHotFragment;

public class ZoneFragmentAdapter extends FragmentPagerAdapter {

    private int pageCount = 2;

    public ZoneFragmentAdapter(FragmentManager fm) {
        super(fm);
    }

    public ZoneFragmentAdapter(FragmentManager fm, Context context) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0:
                return ZoneAllFragment.newInstance();
            case 1:
                return ZoneHotFragment.newInstance();
        }
        return null;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return null;
    }

    @Override
    public int getItemPosition(Object object) {
        return POSITION_NONE;
    }

    @Override
    public int getCount() {
        return pageCount;
    }

}
